# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from apps.projects.models import Category, Project


urlpatterns = patterns('',
    url(r'^(?P<slug>[\w-]+)/$',
        'django.views.generic.list_detail.object_detail',
        dict(
            queryset=Project.objects.all(),
            slug_field='slug',
        ),
        name='project_entry',
    ),
    url(r'^category/(?P<slug>[\w-]+)/$',
        'django.views.generic.list_detail.object_detail',
        dict(
            queryset=Category.objects.all(),
            slug_field='slug'
        ),
        name='projects_category',
    ),
    url(r'^$',
        'django.views.generic.list_detail.object_list',
        dict(
            queryset=Project.objects.all(),
        ),
        name='projects',
    ),
    )

